<?php
namespace app\commission\controller;
use app\AdminRest;
use app\ApiRest;
use longbingcore\wxcore\WxPay;
use think\App;
use app\commission\model\Cash as Model;
use app\commission\model\Water;
use app\commission\model\Wallet;

use think\facade\Cache;
use think\facade\Db;

class AdminWater extends AdminRest
{

    protected $model;

    protected $water_model;

    protected $wallet_model;

    public function __construct(App $app) {
        parent::__construct($app);
        $this->model        = new Model();

        $this->water_model  = new Water();

        $this->wallet_model = new Wallet();
    }

    /**
     * User: chenniang
     * Date: 2019-12-18 14:30
     * @return void
     * descrption:佣金记录列表
     */
    public function waterList(){

       $input = $this->_input;

       $dis[] = ['a.uniacid','=',$this->_uniacid];

       $dis[] = ['a.status','=',2];

       $where = [];

       if(!empty($input['name'])){

           $where[] = ['c.nickName','like','%'.$input['name'].'%'];

           $where[] = ['d.name','like','%'.$input['name'].'%'];

       }
       $data = $this->water_model->adminWaterList($dis,$where,$input['limit']);

       return $this->success($data);

    }





}
